//
// Created by fanghr on 17-12-24.
//

#include "server.h"
#include "session.h"
#include "../include.h"
#include "config.h"

void server_() {
    BOOST_LOG_TRIVIAL(info) << "server start";
    boost::asio::io_service io_service;
    server server(io_service, DEFAULT_PORT);
    io_service.run();
}

void shm_data_() {
    BOOST_LOG_TRIVIAL(info) << "shm_data start";
    while (true) {
        BOOST_LOG_TRIVIAL(info) << "fake shm_data";
        sleep(100);
    }
}

void thread_void() {
    while (1);
}

int main() {
    signal(SIGSEGV, SIG_IGN);
    signal(SIGABRT, SIG_IGN);
    boost::thread _server(&server_);
    boost::thread _shm_data(&shm_data_);
    boost::thread _thread_void(&thread_void);

    _thread_void.join();
}